<template>
  <div class="app-system-route">
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      text-color="#000"
      active-text-color="#1890ff"
      @select="handleSelect"
    >
      <el-menu-item index="1">月度报表</el-menu-item>
      <el-menu-item index="2">登录协议</el-menu-item>
    </el-menu>

    <report v-show="activeIndex == 1" />
    <agreement v-show="activeIndex == 2" />
  </div>
</template>

<script>
import agreement from './components/agreement'
import report from './components/report'
export default {
  components: {
    agreement,
    report
  },
  data() {
    return {
      activeIndex: '1'
    }
  },
  mounted() {},
  created() {},
  methods: {
    handleSelect(key, keyPath) {
      this.activeIndex = key
      console.log(key, keyPath)
    }
  }
}
</script>

<style>
.app-system-route {
  width: 100%;
  padding: 10px;
}
</style>
